<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        ul{
            list-style-type: none;
            margin-left: 50px;
            margin-top: 200px;
        }
        li{
            width: 100px;
            height: 100px;
            position: relative;
            overflow: hidden;
            margin-top: 10px;
        }
        .p{
            width: 100px;
            height: 100px;
            background-color: lightcoral;
            line-height: 100px;
            text-align: center;
            
        }
        .ps{
            width: 100px;
            height: 100px;
            background-color: lawngreen;
            line-height: 100px;
            text-align: center;
            position: absolute;
            left: 0;
            top: 0;
            transform-origin: 0px 100px;
            transform: rotate(90deg);
            transition: linear 0.2s;
        }
        li:hover>.ps{
            transform:rotate(0deg);
        }
    </style>
</head>
<body>
    <ul>
        <li>
            <p class="p">菜单</p>
            <p class="ps">菜单</p>
        </li>
        <li>
            <p class="p">菜单</p>
            <p class="ps">菜单</p>
        </li>
        <li>
            <p class="p">菜单</p>
            <p class="ps">菜单</p>
        </li>
        <li>
            <p class="p">菜单</p>
            <p class="ps">菜单</p>
        </li>
    </ul>
</body>
</html>